/*
package cn.bs.seckill.service.impl;


*/
/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 布索
 * @since 2022-02-17
 *//*

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public RespBean doLogin(LoginVo loginVo) {
        String mobile = loginVo.getMobile();
        String password = loginVo.getPassword();

        //判断账号密码是否为空
        if (StringUtils.isEmpty(mobile)||StringUtils.isEmpty(password)) {
            return RespBean.error(RespBeanEnum.LOGIN_ERROR);
        }
        //判断是否正确输入手机号
        if (!ValidatorUtil.isMobile(mobile)){
            return RespBean.error(RespBeanEnum.LOGIN_FAILED);
        }
        User user = userMapper.selectById(mobile);
        //判断手机号是否存在
        if (null==user){
            return RespBean.error(RespBeanEnum.LOGIN_FAILED);
        }
        //判断密码是否正确
        if (!(user.getPassword()).equals(MD5Util.toDBPassEpt(password))){
            return RespBean.error(RespBeanEnum.LOGIN_FAILEDP);

        }
        return RespBean.success();
    }
}
*/
